#include<iostream>
using namespace std;
template<class T>
void Swap(T &x,T &y)
{
	T tmp = x;
	x=y;
	y= tmp;
	cout<<x<<" "<<y<<endl;
}
int main(){
	int n=1,m=2;
	Swap(n,m);
	double f=1.2,g=2.3;
	Swap(f,g);
	return 0;
}